home *** CD-ROM | disk | FTP | other *** search
- %! page_skew.ps - A page turned at at 30 degree angle
- %% This is a LameTeX Page Description File written in PostScript.
- %% Postscript Code by Jon Monsarrat Copyright 1992
- %% permission given for anything except selling this or deleting the header.
-
- %%%%%%%%%%%%%%%% width height angle left bot Skew-Page %%%%%%%%%%%%%%%%%%%%%%
- % Draws a twisted page at ang degrees, given margins and size
- /Skew-Page
- {
- % wp hp ang lp bp
- moveto dup cos exch sin 2 copy % wp hp cosang sinang cosang sinang
- 5 index mul exch 6 -1 roll mul % hp cosang sinang sinwpang coswpang
- 5 2 roll 2 index mul neg 3 1 roll mul % sinwpang coswpang -sinhpang coshpang
- 2 index 4 index rlineto % sinwpang coswpang -sinhpang coshpang
- rlineto neg exch neg rlineto % -empty-
- closepath
- } bind def
-
- %%%%%%%%%%% icon-name LeftMarginIcon - %%%%%%%%%%%%
- % Given the name of an icon, executes the icon in the left margin.
- /LeftMarginIcon
- {
- gsave
- bslot 50 sub ypos 72 sub translate cvx exec
- grestore
- } bind def
-
- %% REQUIRED DEFINITIONS START HERE %%
-
- /PageShape
- {
- 8.5 in 11 in 30 0 0 Skew-Page
- currentflat 8 mul
- } bind def
-
- % Anything to do when a new page is started
- /StartPage
- {
- 0 0 moveto -30 rotate
- } bind def
-
- % Anything to do when a new page is ended
- /EndPage
- {
- pagenumber 4 string cvs
- dup stringwidth pop 8.5 in
- formatdict /rightmargin get sub
- formatdict /leftmargin get sub
- exch sub 2 div formatdict /leftmargin get add
- formatdict /bottommargin get 2 div moveto show
- /pagenumber pagenumber 1 add def
- showpage % A new page here really does mean start a new page.
- } bind def
-
- %% INITIALIZATION TO DO WHEN FILE IS LOADED %%
- % Page-specific defaults that describe the page.
- /InitPage
- {
- /evenodd true def % if true use even-odd rule; false means winding rule
- /fillout false def % true means fill outside shape. false is inside.
-
- /in {72 mul} def
- /BM 0 def % Bottom Margin
- /TM 11 in def % Top Margin
- /LM 0 def % Left Margin
- /RM 8.5 in def % Right Margin
-
- userdict /pagenumber known not % Initialize pagenumber if not done already
- { userdict begin /pagenumber 1 def end} if
- } bind def
-
- InitPage % Just loading this file initializes the page.
-